
{extend name="mainadmin@layouts/base" /}
{block name="main" }
<header >
    <div class="page-breadcrumbs">
        <ul class="breadcrumb" >
            <li>
                <i class="fa fa-ellipsis-v"></i>
                <strong>{$row['id']>0?"编辑奖品":"添加奖品"}</strong>
            </li>
        </ul>

        <a class="pull-right pointer p-r" data-toggle="back" title="返回"><i class="fa fa-reply"></i></a>
    </div>
</header>

<section class="scrollable  wrapper">
    <form class="form-horizontal form-validate" method="post" action="{:url('info')}" style="padding:0;">

        <section class="panel panel-default">

            <div class="panel-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">奖品名称：</label>
                    <div class="col-sm-2">
                        <input type="text" class="input-max" data-rule-required="true" name="name" value="{$row.name}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">奖品编号：</label>
                    <div class="col-sm-2">
                        <input type="text" class="input-max" data-rule-required="true" name="bianma" value="{$row.bianma}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">奖品价格：</label>
                    <div class="col-sm-2">
                        <input type="text" class="input-max" data-rule-required="true" data-rule-number="true"  name="price" value="{$row.price}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">奖品数量：</label>
                    <div class="col-sm-2">
                        <input type="text" class="input-max"   data-rule-min="0"  data-rule-number="true"  name="num" value="{$row.num}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">中奖概率：</label>
                    <div class="col-sm-2">
                        <input type="text" class="input-max"  data-rule-number="true" name="gailv" value="{$row.gailv}"> <span style="color: #f00"> * 注：</span><span>填写百分比数字,100表示100%中奖，中奖概率20%则填写20，所有商品总概况加起来不能超过100</span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-sm-2 control-label">是否审核：</label>
                    <div class="col-sm-10">

                        <label>
                            <label><input name="status" type="radio" value="1" {$row['status']=='1'?'checked':''}/>
                                审核
                            </label>
                            <label><input name="status" type="radio" value="0" {$row['status']=='0'?'checked':''} />
                            待审核</label>
                        </label>


                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">是否是‘谢谢参与’：</label>
                    <div class="col-sm-10">

                        <label><input name="isnone" type="radio" value="1" {$row['isnone']=='1'?'checked':''} />
                            是</label>
                        <label><input name="isnone" type="radio" value="0" {$row['isnone']=='0'?'checked':''}/>
                            否</label>


                    </div>
                </div>


                <div class="form-group">
                    <label class="col-sm-2 control-label">奖品图片：</label>
                    <div class="col-sm-4 " >
                        <div class="defUpImgBox" data-toggle="uploaderOne">
                            <img id="img_imagefile" src="{$row.photo|default='__STATIC__/main/img/image.png'}">
                            <input id="input_imagefile" type="hidden"  name="photo"  value="{$row.photo}">
                            <div class="tips">点击上传</div>
                        </div>
                        <p>
                            <span class="help-inline">图片尺寸：300*300像素</span>
                        </p>
                    </div>
                </div>

                <div class="control-group">
                    <div class="controls col-sm-offset-2">
                        <button type="submit" class="btn btn-primary" data-loading-text="保存中...">保存</button>
                        <input class="btn" name="button" id="button" data-toggle="back" value="取消" type="button">
                    </div>
                </div>

            </div>
        </section>

        <input type="hidden" name="id" value="{$row.id}" >
    </form>

</section>

{/block}
{block name="footer" }
<script type="text/javascript">
    seajs.use("dist/plupload/init.js")

</script>
{/block}
